<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=10.0, user-scalable=yes">
    <link rel="stylesheet" href="/fuman/css/style.default.css" type="text/css" />
    <script type="text/javascript" src="/fuman/js/plugins/jquery-1.7.min.js"></script>
    <script type="text/javascript" src="/fuman/js/plugins/jquery-ui-1.8.16.custom.min.js"></script>
    <!--<script type="text/javascript" src="/fuman/js/plugins/jquery.cookie.js"></script>-->
    <!--<script type="text/javascript" src="/fuman/js/plugins/jquery.dataTables.min.js"></script>-->
    <!--<script type="text/javascript" src="/fuman/js/plugins/jquery.uniform.min.js"></script>-->
    <script type="text/javascript" src="/fuman/js/custom/general.js"></script>
    <script type="text/javascript" src="/fuman/js/DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="/fuman/js/plugins/jquery.validate.min.js"></script>
    <script type="text/javascript" src="/fuman/js/pubilc.js"></script>
    <script type="text/javascript" src="/fuman/js/form/aws_admin.js" ></script>
    <script type="text/javascript" src="/fuman/js/form/framework.js" ></script>
    <script type="text/javascript" src="/fuman/js/plugins/jquery.jgrowl.js"></script>
    <script language="javascript">
        jQuery(document).ready(function(){
            {{if $isclosetips==1}}
            var sticky = false;
            {{else}}
            var sticky = true;
            {{/if}}
            {{if $messagelist}}
            {{foreach from=$messagelist item=res key=key}}
            $.jGrowl("消息[{{$res.id}}]：{{$res.message}}", {header: '{{$res.message_type}}',sticky: sticky,position:'bottom-right',closer:false,
            close: function(e,m,o) {
            closetips(e,m,o);
            },
        });
        {{/foreach}}
        {{/if}}

        });
    </script>
    <script type="text/javascript">

        var getByClass = function (oParent, sClass) {
            var aEle = oParent.getElementsByTagName("*");
            var re = new RegExp("\\b" + sClass + "\\b");
            var arr = [];

            for (var i = 0; i < aEle.length; i++) {
                if (re.test(aEle[i].className)) {
                    arr.push(aEle[i]);
                }
            }
            return arr;
        }

        var setMainNav = function () {
            var oMainNav = document.getElementById("mainNav");
            var aLi = getByClass(oMainNav, "list")[0].getElementsByTagName("li");
            var aGameHover = getByClass(oMainNav, "game_hover");
            var aHoverCont = getByClass(oMainNav, "hover_cont");

            for (var i = 0; i < aGameHover.length; i++) {
                aGameHover[i].index = i;
                aGameHover[i].onmouseover = function () {
                    this.className += " "+"game_hover_current";
                    for (var j = 0; j < aHoverCont.length; j++) {
                        aHoverCont[j].index_j = j;
                        aHoverCont[j].style.display = "none";
                        aHoverCont[j].onmouseover = function () {
                            this.style.display = "block";
                            aGameHover[this.index_j].className += " "+"game_hover_current";
                        }

                        aHoverCont[j].onmouseout = function () {
                            this.style.display = "none";
                        }
                    }
                    if (aHoverCont[this.index]) {
                        aHoverCont[this.index].style.display = "block";
                    }
                }
            }

            for (var i = 0; i < aLi.length; i++) {
                aLi[i].index = i;
                aLi[i].onmouseout = function () {
                    if (aHoverCont[this.index]) {
                        aHoverCont[this.index].style.display = "none";
                    }
                    aGameHover[this.index].className = "game_hover";
                }
            }
        }

        window.onload = function () {
            setMainNav();
        }
        $(function(){
            $(window).scroll(function(){
                if($(this).scrollTop() > 100){
                    $('#goToTop').fadeIn();
                }else{
                    $('#goToTop').fadeOut();
                }
            });
            $('#goToTop a').click(function(){
                $('html ,body').animate({scrollTop: 0}, 300);
                return false;
            });
        });
    </script>
</head>
<div id="aw-ajax-box" class="aw-ajax-box"></div>
<!--topheader-->
<div class="header">
    <div class="topheader">
    <div class="left">
    <h1 class="logo">&nbsp;牧牛.<span>ERP</span></h1>
    <span class="slogan"></span>
    </div>
    </div>
    <div class="header_bg">
        <div>
            <div class="nav headercenter" id="mainNav">
                <ul class="headmenulist list" >
                    {{foreach from=$menudb item=li key=key}}
                    {{if $managers || in_array({{$key}},$isshowauth)}}
                    <li>
                        <a href="javascript:void(0)" class="game_hover">{{$key}}</a>
                        <div class="hover_cont wlyx">
                            <div class="nav_cont">
                                {{foreach from=$li item=o key=s}}
                                {{if $managers || in_array({{$s}},$twoisshowauth)}}
                                <div class="nav_li">
                                    <div class="nav_li_l">
                                        {{$s}}
                                    </div>
                                    <div class="nav_li_r">
                                        {{foreach from=$o item=t key=d}}
                                        {{if $t.rank==3}}
                                        {{if $managers || in_array({{$d}},$threehowauth)}}
                                        <a href="{{$t.link}}">{{if $t['link']==$currentfile}} <span style="color:#CC6600;">{{$d}}</span>{{else}}{{$d}}{{/if}}</a>┊
                                        {{/if}}
                                        {{/if}}
                                        {{/foreach}}
                                    </div>
                                </div>
                                {{/if}}
                                {{/foreach}}
                            </div>
                        </div>
                    </li>
                    {{/if}}
                    {{/foreach}}





                </ul>
            </div>
        </div>
    </div>
    <div class="topheader">
        <div class="right">
            <div class="notification" style="display:none;"> <a class="count" href="javascript:void(0)" onclick="window.location.href='/welcome/ajaxbutton?op=showMoreMessage'"><span>{{$messageNum}}</span></a> </div>
            <div class="userinfo"> <img src="/fuman/images/thumbs/avatar.png" alt="" /> <span>欢迎您：{{$username}}</span>
                <div class="userinfodrop">
                    <div class="userdata">
                        <ul>
                            <li><a href="/user/edituser">帐号设置</a></li>
                            {{if $userdepartment==3 || $managers || in_array('116',$showpower)}}<li><a href="/user/Bindingshops">绑定店铺</a></li>{{/if}}
                            <li><a href="/Welcome">ERP套餐服务</a></li>
                            <li><a href="/Welcome">购买记录</a></li>
                            <li><a href="/login/logout">退出系统</a></li>
                        </ul>
                    </div>
                    <!--userdata-->
                </div></div>

            <!--userinfo-->


            <!--userinfodrop-->
        </div>
        <!--right-->
    </div>
</div>